package com.alfayun.fiscalriskanalysis.systemlogs;

import java.time.Instant;
import java.util.Collection;
import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface SystemLogsRepository extends JpaRepository<SystemLogs, Integer> {

	List<SystemLogs> findByTypeIn(Collection<Type> types);
	
	@Query("select s from SystemLogs s where s.type in ?1 and s.status in ?2 and s.createTime between ?3 and ?4")
	List<SystemLogs> findByTypeAndStatusAndCreateTime(List<Type> type, List<Status> status, Instant startTime, Instant endTime);

}
